/**   
 * Copyright © 2018 eSunny Info. Tech Ltd. All rights reserved.
 * 
 * @Package: com.eastcompeace.config 
 * @author: Zousonghua   
 * @date: 2018年4月16日 下午3:03:08 
 */
package com.eastcompeace.config;

/** 
 * @ClassName: CxfConfig 
 * @Description: TODO
 * @author: Zousonghua
 * @date: 2018年4月16日 下午3:03:08  
 */
import javax.xml.ws.Endpoint;

import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.eastcompeace.service.CommonService;

@Configuration
public class CxfConfig {
	@Autowired
	private Bus bus;

	@Autowired
	CommonService commonService;

	/** JAX-WS **/
	@Bean
	public Endpoint endpoint() {
		EndpointImpl endpoint = new EndpointImpl(bus, commonService);
		endpoint.publish("/CommonService");
		return endpoint;
	}
}